$control-toolbar: (
  'item-margin': 0 rem(4px),
  'icon-margin': 0 rem(5px) 0 0,
  'icon-max-width': rem(16px),
  'icon-max-height': rem(16px),
  'icon-font-size': rem(20px),
  'toolbar-bottom-padding': getCssVar('spacing', 'base-tight'),
);
$control-toolbar-embed: (
  'item-height': rem(21px),
  'item-line-height': rem(21px),
  'bg-color': transparent,
);

@include b('control-toolbar') {
  @include set-component-css-var('control-toolbar', $control-toolbar);

  display: flex;
  height: 100%;

  @include e('item') {
    display: flex;
    align-items: center;
    margin: getCssVar('control-toolbar', 'item-margin');
  }

  @include e('item-left') {
    margin-left: 0;

    .van-button {
      background-color: transparent;
      border: none;

      .van-button__text {
        display: flex;
        align-items: center;
      }
    }
  }

  @include e('item-right') {
    margin-right: 0;
    background-color: transparent;

    .van-button {
      background-color: transparent;
      border: none;

      .van-button__text {
        display: flex;
        align-items: center;
      }
    }
  }

  @include e('item-separator') {
    @include no-repeat;
  }

  @include b('control-toolbar-mobnavrightmenu') {
    @include e('item') {
      margin-right: 0;
    }
  }
}

@include b('control-toolbar-right') {
  justify-content: flex-end;
}

@include b('control-toolbar-bottom') {
  display: flex;
  padding: getCssVar('control-toolbar', 'toolbar-bottom-padding');

  .#{bem(control-toolbar, item)} {
    flex: 1;
    --van-button-default-height: #{rem(40px)};

    button {
      width: 100%;
    }

    .van-button__text {
      display: flex;
      gap: 8px;
      align-items: center;
    }
  }
}
